package com.wandian.news.adapter;

import android.text.Html;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wandian.news.R;
import com.wandian.news.bean.KnowledgeTSBean;


/**
 * @author Administrator
 * @date 2019/12/16-13:32
 * @description 适配器
 **/
public class KnowledgeTSRecycleAdapter extends BaseQuickAdapter<KnowledgeTSBean.NewslistBean, BaseViewHolder> {

    public KnowledgeTSRecycleAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper,KnowledgeTSBean.NewslistBean item) {
        TextView tv_title = helper.getView(R.id.tv_title);
        TextView tv_content = helper.getView(R.id.tv_content);
        TextView tv_content_from = helper.getView(R.id.tv_content_from);
        tv_title.setText(item.getTitle()+"");
        tv_content.setText(Html.fromHtml(item.getContent()) +"");
        tv_content_from.setText(item.getAuthor()+"");
        TextView tv_content_intro = helper.getView(R.id.tv_content_intro);
        tv_content_intro.setText(item.getIntro()+"");
        TextView tv_content_kind = helper.getView(R.id.tv_content_kind);
        tv_content_kind.setText(item.getKind()+"");
    }


}
